package com.exchange.employee.entity;


import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;

@Document(indexName = "megacorp", type = "employee", shards = 1, replicas = 0)
public class Employee {

    /**
     * 主键
     */
    @Id
    private Long id; // spuId

    /**
     * 姓
     */
    @Field(type = FieldType.Keyword)
    private String first_name;

    /**
     * 名
     */
    @Field(type = FieldType.Keyword)
    private String last_name;

    /**
     * 年龄
     */
    @Field(type = FieldType.Integer)
    private Integer age;

    /**
     * 说明
     */
    @Field(type = FieldType.Text, analyzer = "ik_smart") // ik_max_word
    private String about;

    /**
     * 兴趣爱好
     */
    private List<String> interests;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getFirst_name() {
        return first_name;
    }

    public void setFirst_name(String first_name) {
        this.first_name = first_name;
    }

    public String getLast_name() {
        return last_name;
    }

    public void setLast_name(String last_name) {
        this.last_name = last_name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getAbout() {
        return about;
    }

    public void setAbout(String about) {
        this.about = about;
    }

    public List<String> getInterests() {
        return interests;
    }

    public void setInterests(List<String> interests) {
        this.interests = interests;
    }
}
